package com.jacky.iot.resources;

import org.eclipse.californium.core.CoapResource;
import org.eclipse.californium.core.server.resources.CoapExchange;


public class TemperatureResource extends CoapResource {


    public TemperatureResource(String name) {
        super(name);
        getAttributes().setTitle("Temperature");
    }

    @Override
    public void handleGET(CoapExchange exchange) {
        System.out.println("request uri:" + exchange.advanced().getRequest().getURI());
        exchange.respond("25.3");
    }
}
